<%@ page language="java" import="java.util.*, java.text.*,java.sql.Timestamp,com.zjut.zs.util.tools.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,com.zjut.zs.file.manager.*, com.zjut.zs.file.dao.*,
com.zjut.zs.file.manager.*, com.zjut.zs.file.dao.*,com.zjut.zs.zxlb.manager.*, com.zjut.zs.zxlb.dao.*,com.zjut.zs.shhd.manager.*, com.zjut.zs.shhd.dao.*,com.zjut.zs.hjqk.manager.*, com.zjut.zs.hjqk.dao.*,
com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/plugins/webupload/css/upload/upload.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/plugins/webupload/plugin/ueditor/third-party/webuploader/webuploader.css">				
<script type="text/javascript" src="../plugins/assets/plugins/jquery-3.5.1.min.js"></script> 

<style type="text/css">
<!--
.select1 {
	border:1px solid #ccc;
	padding:8px;
	width:200px;
}
-->
</style>
</head>

<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
<%
if (session.getAttribute("zsUser") == null&&session.getAttribute("admin") == null&&session.getAttribute("user") == null) {
	out.print("<script>alert('由于长时间未操作，系统已经自动注销，请重新登陆');</script>");
	out.print("<script>top.window.location='main.jsp';</script>");
} else {
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);
AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsUserStatusManager smanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsFileManager fmanager = (ZsFileManager) SpringContextUtil.getBean("ZsFileManager");
ZsZxlbManager xmanager = (ZsZxlbManager) SpringContextUtil.getBean("ZsZxlbManager");
ZsShhdManager hmanager = (ZsShhdManager) SpringContextUtil.getBean("ZsShhdManager");
ZsHjqkManager jmanager = (ZsHjqkManager) SpringContextUtil.getBean("ZsHjqkManager");
StringBuffer zxstring = new StringBuffer();
ZsFile file = new ZsFile();
ZsUser user = null;
List flist = new ArrayList();
if((session.getAttribute("admin")!=null||session.getAttribute("user")!=null) && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");	
} 	
ZsUserStatus userStatus = smanager.getDataByUser(user);
String key = MD5.toMD5(user.getUsId().toString());

String msg = " ";
boolean editpermit = false;
if( (Status.SENDSTATUS_YES.getStatus().equals(userStatus.getSendStatus()) 
&& Status.CHECKSTATUS_NULL.getStatus().equals(userStatus.getCheckStatus())
&& Status.ON.getStatus().equals(school.getScFilesendActive()) 
&& !Status.APPSTATUS_YES.getStatus().equals(userStatus.getAppStatus()) )//已经提交、未确认、未审核且开放上传
|| session.getAttribute("admin")!=null //或者是系统管理员
|| (Status.APPSTATUS_NOTIME.getStatus().equals(userStatus.getAppStatus())&&Status.CHECKSTATUS_NULL.getStatus().equals(userStatus.getCheckStatus())  )) {//或者是管理员退回延迟提交只要未审核就可以改
	editpermit = true;
}

if (!Status.ON.getStatus().equals(school.getScFilesendActive())) {
	msg = "已经截止上传";
} else if (Status.APPSTATUS_YES.getStatus().equals(userStatus.getAppStatus())){
    msg = "材料已经确认";
} else if (!Status.CHECKSTATUS_NULL.getStatus().equals(userStatus.getCheckStatus())) {
	msg = "材料已经初审";
}

 %>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">材料提交</a></li>
    </ul>
    </div>
    
   <div class="info" >
材料确认状态：<%=userStatus.getAppStatus() %>，材料上传状态：<%=userStatus.getFileStatus() %>
 <%
   out.print(msg); 
 //如果初审直接截止
   if(Status.APPSTATUS_NULL.getStatus().equals(userStatus.getAppStatus()) || Status.APPSTATUS_NO.getStatus().equals(userStatus.getAppStatus()) || Status.APPSTATUS_NOTIME.getStatus().equals(userStatus.getAppStatus())) {//未确认或者退回
   	   out.println("。如果所有材料已经上传完整，请点击右侧‘确认材料完整’完成提交！<input id='button' type='button' onclick='send()' value='确认信息材料完整' class='btn btn-primary' style='margin:10px;display:none'/>");
   } else if(!Status.CHECKSTATUS_NULL.getStatus().equals(userStatus.getCheckStatus()) ) {
	   out.println("。<input type='button' value='已经截止' class='btndisable' style='margin:10px;'/>");
   } else if(!Status.ON.getStatus().equals(school.getScAppActive()) || !Status.ON.getStatus().equals(school.getScFilesendActive())) {//未启用
	   out.println("。<input type='button' value='已经截止' class='btndisable' style='margin:10px;'/>");
   } else if(Status.APPSTATUS_YES.getStatus().equals(userStatus.getAppStatus())) {//本人已经确认
   	   out.println("。<input type='button' value='本人已确认材料' class='btndisable' style='margin:10px;'/>");
   }
   if (session.getAttribute("admin")!=null||session.getAttribute("user")!=null) {%>
   <div class="imgrotatebutton"><a href='../admin/zsImgRotate.jsp?fiType=sbcl&usId=<%=user.getUsId() %>' target='_blank'>批量浏览模式(切换、放大、翻转)</a></div>
   <%} %>
   <div id="show"></div>
   </div>
    <div id="ossfile"></div>						
	<pre id="console"></pre>	
	
    <div class="formbody">
     <%
		    List fnlist = anconfig.getConfigsInfoByClass("上传材料名称(必需)");
		    List fnlist2 = anconfig.getConfigsInfoByClass("上传材料名称(可选)");
		    String filelocalview = anconfig.getSingleConfigInfoByName("材料本地浏览");
		    System.out.println(fnlist.size());
		    for (int i=0; i<fnlist.size(); i++){
		    	AnConfig fn = (AnConfig)fnlist.get(i);
		    	String fname = fn.getCoValue();
		    	file.setZsUser(user);
		    	file.setFiName(fname);	
		    	file.setFiType("sbcl");
		    	flist = fmanager.getDataByInstance(1,100,"fiId","asc",file).getObjects();
		        //flist = fmanager.findByExample(file);
		        
		     %>
    		<table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1"><%=fn.getCoValue() %><font color='red'>*</font></th>
		    <th class="imgtableth1">材料缩略图</th>		       
		    <th class="imgtableth2">
		    <%if(editpermit){%> 
		    <a id="a<%=i %>" href="#" onclick="upload('<%=fn.getCoValue() %>','sbcl')"><img src="images/iadd.png" style="margin:5px;vertical-align: middle;"/>上传材料</a>
		    <%} %>
		   </th>
		    </tr>
		    </thead>
		    <tbody>		      
		      <%
		      
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);
		    			String fileName = fname+"材料"+(k+1);
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td style='color:red'>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		     </tbody>
		    </table>
		    <br>
    		<%} 		    
		    for (int i=0; i<fnlist2.size(); i++){
		    	AnConfig fn = (AnConfig)fnlist2.get(i);
		    	String fname = fn.getCoValue();
		    	file.setZsUser(user);
		    	file.setFiName(fname);	
		    	file.setFiType("sbcl");
		    	flist = fmanager.getDataByInstance(1,100,"fiId","asc",file).getObjects();		    	
		     %>
		     <table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1"><%=fn.getCoValue() %></th>		
		    <th class="imgtableth1">材料缩略图</th>		              
		    <th class="imgtableth2">
		    <%if(editpermit){ %>
		    <a id="aa<%=i %>" href="#" onclick="upload('<%=fn.getCoValue() %>','sbcl')" ><img src="images/iadd.png" style="margin:5px;vertical-align: middle;"/>上传材料</a>
		    <%} %>
		    </th>
		    </tr>
		    </thead>
		    <tbody>		      
		      <%	
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);	
		    			String fileName = fname+"材料"+(k+1);	     	    				    		      				          
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		      
		     </tbody>
		    </table>
		     <br>
    	<%} 
		    flist = fmanager.getOtherFiles(user.getUsId(),"sbcl");
		    if (null!=flist && flist.size()>0) {
    	%>    	
    	<table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1">其他材料</th>		  
		    <th class="imgtableth1">材料缩略图</th>		            
		    <th class="imgtableth2"></th>
		    </tr>
		    </thead>
		    <tbody>		
		     <%
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);
		    			String fileName = "其他材料"+(k+1);	    				    		      				          
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		     </tbody>
		</table><br>
		<%} 
		%>
		
		
		
		
		
		
		<%
		if(Status.ON.getStatus().equals(school.getScZxlbActive())) {
		%>
		<div class="formtitle"><span>专项类别佐证材料</span></div>
		<% 	 
			ZsZxlb zxlb = new ZsZxlb();			
			List zlist = new ArrayList();
			if (user!=null) {
				zxlb.setZsUser(user);
				zlist = xmanager.getDataByInstance(1,100,"zxId","asc",zxlb).getObjects();
				
			}  
		    for (int i=0; i<zlist.size(); i++){
		    	ZsZxlb obj = (ZsZxlb)zlist.get(i);
		    	zxstring.append(obj.getZxType()+"|"+obj.getZxName()+"|"+obj.getZxJb()+";");
		    	String fname = obj.getZxName();
		    	file.setZsUser(user);
				file.setFiName(obj.getZxId()+"");	
				file.setFiType("zxlb");
				flist = fmanager.findByExample(file);
		     %>
    		<table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1"><%=obj.getZxName() %><font color='red'>*</font></th>	
		    <th class="imgtableth1">材料缩略图</th>		       	       
		    <th class="imgtableth2">
		    <%if(editpermit){%> 
		    <a id="a<%=i %>" href="#" onclick="upload('<%=obj.getZxId() %>','zxlb')"><img src="images/iadd.png" style="margin:5px;vertical-align: middle;"/>上传材料</a>
		    <%} %>
		   	</th>
		    </tr>
		    </thead>
		    <tbody>		      
		    <%		      
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);
		    			String fileName = fname+"材料"+(k+1);	          				          
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td style='color:red'>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		    </tbody>
		    </table>
		    <br>
    		<%}}  %>
    		
    		
    		
    		
    		
    		
    		<%
			if(Status.ON.getStatus().equals(school.getScShhdActive())) {
			%>
    		<div class="formtitle"><span>社会活动佐证材料</span></div>
			<% 	
			ZsShhd shhd = new ZsShhd();
			List hlist = new ArrayList();
			if (user!=null) {
				shhd.setZsUser(user);
				hlist = hmanager.getDataByInstance(1,100,"hdId","asc",shhd).getObjects();
			}  
		    for (int i=0; i<hlist.size(); i++){
		    	ZsShhd obj = (ZsShhd)hlist.get(i);
		    	String fname = obj.getHdName();
		    	file.setZsUser(user);
				file.setFiName(obj.getHdId()+"");	
				file.setFiType("shhd");
				flist = fmanager.findByExample(file);		        
		     %>
    		<table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1"><%=obj.getHdName() %><font color='red'>*</font></th>
		    <th class="imgtableth1">材料缩略图</th>		       		       
		    <th class="imgtableth2">
		    <%if(editpermit){%> 
		    <a id="a<%=i %>" href="#" onclick="upload('<%=obj.getHdId() %>','shhd')"><img src="images/iadd.png" style="margin:5px;vertical-align: middle;"/>上传材料</a>
		    <%} %>
		   	</th>
		    </tr>
		    </thead>
		    <tbody>		      
		   	<%		      
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);
		    			String fileName = fname+"材料"+(k+1);	    				          				          
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td style='color:red'>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		    </tbody>
		    </table>
		    <br>
    		<%}} %>
    		
    		
    		
    		
    		
    		
    		
    		<%
			if(Status.ON.getStatus().equals(school.getScHjqkActive())) {
			%>
    		<div class="formtitle"><span>其他获奖佐证材料</span></div>
			<% 	
			ZsHjqk hjqk = new ZsHjqk();
			List jlist = new ArrayList();
			if (user!=null) {
				hjqk.setZsUser(user);
				jlist = jmanager.getDataByInstance(1,100,"hjId","asc",hjqk).getObjects();
			}  
		    for (int i=0; i<jlist.size(); i++){
		    	ZsHjqk obj = (ZsHjqk)jlist.get(i);
		    	String fname = obj.getHjName();
		    	file.setZsUser(user);
				file.setFiName(obj.getHjId()+"");	
				file.setFiType("hjqk");
				flist = fmanager.findByExample(file);		        
		     %>
    		<table class="imgtable">
		    <thead>
		    <tr>
		    <th class="imgtableth1"><%=obj.getHjName() %><font color='red'>*</font></th>	
		    <th class="imgtableth1">材料缩略图</th>		       	       
		    <th class="imgtableth2">
		    <%if(editpermit){%> 
		    <a id="a<%=i %>" href="#" onclick="upload('<%=obj.getHjId() %>','hjqk')"><img src="images/iadd.png" style="margin:5px;vertical-align: middle;"/>上传材料</a>
		    <%} %>
		   	</th>
		    </tr>
		    </thead>
		    <tbody>		      
		   	<%		      
		    	if (flist.size()>0) {
		    		for (int k = 0; k < flist.size(); k++) { 
		    			ZsFile fi = (ZsFile)flist.get(k);
		    			String fileName = fname+"材料"+(k+1);	    			      				          
		    			String url = fmanager.getFileURL(filelocalview, fi.getFiFile(), user.getUsIdcard(), false);
		    			out.print("<tr><td><a href='"+url+"' target='_blank'>"+fileName+" "+fi.getAddTime()+"</a></td>");
		    			out.print("<td><a href='"+url+"' target='_blank'><img src='"+url+"' height='50' ></a></td><td>");
		    			if(editpermit){
		    				out.println("<a href='#'  onclick=filedelete('"+fi.getFiId()+"')>删除</a>");
		    			}
		    			out.print("</td></tr>");
		    		}
		    	} else {
		    		out.print("<tr><td style='color:red'>尚未上传</td><td></td><td></td></tr>");
		    	}
		    %>
		    </tbody>
		    </table>
		    <br>
    		<%}} %>
    		
    		
    		
    		
    		
		
    <form id="ff" name="add" role="form" class="form-horizontal" action="" method="post"  style="display:none;">
		<div id="container" style="width:96%;margin:0 auto;">
			<table id="zxtable" class="imgtable" style="width:100%;margin:0 auto;">
		    <thead>
		    <tr>
		    <th>材料名称</th>							    
		    <th>佐证材料</th>
		    </tr>
		    </thead>
		    <tbody>
		    <tr>
		    <td style="text-indent: 5px;"><input id="fiName" name="fiName" type="text" class="dfinput" value="" required style="display:none;"/></td>
		    <td style="text-indent: 5px;">
		    <a href='#' target='_blank'>材料</a>
		    </td>
		    </tr>
		    </tbody>
		    </table>
		    <input name="fiFile" type="text" id="fiFile" value=""  class="dfinput"  style="display:none;"/>  	
			<input id="fiId" name="fiId" type="text" class="dfinput" value="" style="display:none;"/>
		    <input id="zsUser.usId" name="zsUser.usId" type="text" class="dfinput" value="<%=user.getUsId()%>" style="display:none;"/>
		    <input id="fiType" name="fiType" type="text" class="dfinput" value="sbcl" style="display:none;"/>
			<div id="uploaderfile" class="wu-example">
			    <!--用来存放文件信息-->
			    佐证材料：	
			    <div class="btns">								 
					<a id="postfiles" href="javascript:void(0);" class="btn btn-default" style="float:right;margin:10px;">确认保存</a>
				    <a id="selectfiles" href="javascript:void(0);" class="btn" style="float:right;margin:10px;">选择文件</a>
			    </div>
			</div>
			<script type="text/javascript" src="lib/crypto1/crypto/crypto.js"></script>
			<script type="text/javascript" src="lib/crypto1/hmac/hmac.js"></script>
			<script type="text/javascript" src="lib/crypto1/sha1/sha1.js"></script>
			<script type="text/javascript" src="lib/base64.js"></script>
			<script type="text/javascript" src="lib/plupload-2.1.2/js/plupload.full.min.js"></script>
			<script type="text/javascript" src="<%=request.getContextPath() %>/plugins/webupload/scripts/upload/ossfileupload.js"></script>   
		</div> 
 	</form>
     <div><%out.print(anconfig.getSingleConfigInfoByName("材料上传需知")); %></div>
   </div>

<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.validate.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.metadata.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" type="text/javascript" charset="UTF-8"></script>
<script src="../plugins/assets/plugins/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js" type="text/javascript"  charset="UTF-8"></script>
<script src="js/formvalidate.js" type="text/javascript"></script>
<script src="../admin/js/publicManager.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript">
	var json;
	var zxlb="<%=zxstring%>";
	
		var updateOneAction = '../zsFileSave.action?randnum='+Math.floor(Math.random()*1000000);
		var loactionurl = 'zs_filesend.jsp';
		var fi_name = "";		
				
		function checkSelections(fiId){
		$.ajax({
			    cache: false,
			    type: "POST",
			    url:"../zsFileCheck.action?fiId="+fiId,
			    dataType:"html",
			    async: false,
			    error: function(request) {
			    	alert("设置状态有误");
			    },
			    success: function(data) {///成功跳转
			    	alert("设置状态成功");
				    window.location = 'zs_filesend.jsp?usId=<%=user.getUsId()%>?'; ///当用ajax访问 时候成功的时候就自动的跳转过去
	            }
			});
		}
		$('.imgtable tbody tr:odd').addClass('odd');
		
		
	function filedelete(fiId){
	//alert(fiId);
	$.ajax({
		    cache: false,
		    type: "POST",
		    url:"../zsFileDelete.action?fiId="+fiId+"&key=<%=MD5.toMD5(user.getUsId().toString())%>",
		    dataType:"json",
		    async: false,
		    error: function(request) {
		    	alert("删除有误");
		    },
		    success: function(data) {///成功跳转
		    	alert("删除成功");
			    window.location = 'zs_filesend.jsp?usId=<%=user.getUsId()%>'; ///当用ajax访问 时候成功的时候就自动的跳转过去
            }
		});
	}	
		
	function upload(fi_name, fi_type){
	//alert(fi_name);
	 $("#fiName").val(fi_name);	
	 $("#fiType").val(fi_type);			
	document.getElementById("selectfiles").click();			  			
	}
	
	function send() {
		if(confirm("注意！！！请您仔细检查信息填写及材料上传是否准确完整。确认后，报名完成，您的信息及材料将不能再修改 ！！！您是否确认材料完整？")) {
			$.ajax({
		    	cache: false,
		    	type: "GET",
		        url:'../zsUserStatusAppPublic.action?usId=<%=user.getUsId()%>&key=<%=key%>&randnum='+Math.floor(Math.random()*1000000),
		        data:{},// 您的formid
		        async: false,
		        error: function(request) {
		        	alert("确认有误");
		        },
		        success: function(data) {
		        	console.info(data);
		        	if(data.flag=="error"){
		        		alert("无法确认，材料不完整。请在本页仔细检查所有材料是否上传。");	
		        	} else {
		        		alert("确认成功！如后续发现材料有误，请在‘申请撤回’中撤回材料确认。");		    
		        		window.location = 'index.jsp';
		        	}
		        }
		    });
		}		
	} 
	
	function submitFileFormAdvance() {//带对象form提交
		var jsonString = JSON.stringify(serializeToJSON('#ff'));
		//alert(jsonString);
		ajaxSubmitFileForm(jsonString);
	}

	function ajaxSubmitFileForm(jsonString) {
		console.log(jsonString);
		$.ajax({
	    	cache: false,
	    	type: "POST",
	        url:'../zsFileSave.action?randnum='+Math.floor(Math.random()*1000000),
	        data:{rowstr:jsonString},// 你的formid
	        async: false,
	        error: function(request) {
	        	alert("保存有误");
	        },
	        success: function(data) {
	        	alert("保存成功");		            
	            if ("undefined" != typeof loactionurl) {
	            	window.location = loactionurl;
	            }
	        }
	    });
	}
		</script>
<script type="text/javascript">
var json;
var zxlb="<%=zxstring%>";
$(function(){
	$.get("../zsApplyView.action?usId=<%=user.getUsId()%>&randnum="+Math.floor(Math.random()*1000000), function(data) {
		json=data.rows;
		<%=school.getScSubJs() %>
	});
});

</script> 
<%} %>		
</body>

</html>
